package cn.market.service.user.impl;

import java.util.List;

import javax.persistence.Query;

import org.springframework.stereotype.Service;

import cn.market.bean.user.Comment;
import cn.market.service.base.DaoSupport;
import cn.market.service.user.CommentService;

@Service
public class CommentServiceBean extends DaoSupport<Comment> implements CommentService {

	@Override
	public List<Comment> findAllCommentsByProductId(Integer productid) {
		
		return null;
	}

	@Override
	public void deleteCommentById(Integer commentid) {
		String sql = "update Comment c set c.isShowAbale=?1";
		Query query = em.createQuery(sql);
		query.setParameter(1, false);
		query.executeUpdate();
	}


}
